﻿using System;
namespace Server.Core.Serialization.BooMessaging
{
    public abstract class BooContract
    {
        protected BooContract(Type type)
        {
            ArgAssert.NotNull(type, "type");
            UnderlyingType = type;
        }

        public Type UnderlyingType { get; private set; }

        public abstract bool IsPackage { get; }

        public void Write(BooMessageWriter writer, object obj)
        {

        }

        protected abstract void DoWrite(BooMessageWriter writer, object obj);
    }
}
